//package com.ruibang.glass.quality.component.job;
//
//import com.baomidou.mybatisplus.core.toolkit.CollectionUtils;
//import com.baomidou.mybatisplus.core.toolkit.StringUtils;
//import com.ruibang.glass.quality.constant.Constants;
//import com.ruibang.glass.quality.domain.req.DefectLossReq;
//import com.ruibang.glass.quality.domain.resp.ReceivePackage;
//import com.ruibang.glass.quality.entity.EveryHourDefectLoss;
//import com.ruibang.glass.quality.service.EveryHourDefectLossService;
//import com.ruibang.glass.quality.service.TotalEquDataService;
//import com.ruibang.glass.quality.util.DataUtils;
//import com.teaming.cloud.framework2.elastic.job3.annotation.ElasticJobScheduler;
//import lombok.extern.slf4j.Slf4j;
//import org.apache.shardingsphere.elasticjob.api.ShardingContext;
//import org.apache.shardingsphere.elasticjob.simple.job.SimpleJob;
//import org.springframework.beans.factory.annotation.Autowired;
//import org.springframework.stereotype.Component;
//import org.springframework.transaction.annotation.Transactional;
//
//import java.time.LocalDate;
//import java.time.LocalDateTime;
//import java.time.format.DateTimeFormatter;
//import java.util.ArrayList;
//import java.util.HashMap;
//import java.util.List;
//import java.util.Map;
//import java.util.stream.Collectors;
//
///**
// * @Author: songJinKang
// * @CreateTime: 2024-01-30  09:17
// * @Description: TODO:TODO:致命缺陷损失数据(每小时)
// * @Version: 1.0
// */
//
//@Slf4j
//@ElasticJobScheduler(cron = "5 40 0/1 * * ?",name = "EveryHourFatalDefectTask",shardingItemParameters = "0=0", jobParameters = "parameter")
////@ElasticJobScheduler(cron = "5 * * * * ?", name = "EveryHourFatalDefectTask", shardingItemParameters = "0=0", jobParameters = "parameter")
//@Component
//public class EveryHourFatalDefectTask implements SimpleJob {
//
//    @Autowired
//    private TotalEquDataService totalEquDataService;
//
//
//    @Override
//    public void execute(ShardingContext shardingContext) {
//        LocalDate now = LocalDate.now();
//        String startDate = now.minusDays(Constants.DEFECT_DEFAULT_QUERY_DAYS).format(DateTimeFormatter.ISO_LOCAL_DATE);
//        String endDate = now.format(DateTimeFormatter.ISO_LOCAL_DATE);
//        DefectLossReq defectLossReq = new DefectLossReq();
//        defectLossReq.setStartDate(startDate);
//        defectLossReq.setEndDate(endDate);
//        totalEquDataService.importEveryHourDefectLoss(defectLossReq);
//    }
//
//
//}
